package com.gxa.meiye.admin.controller.zy;

import com.gxa.meiye.admin.mapper.FeedbackMapper;
import com.gxa.meiye.admin.service.FeedbackService;
import com.gxa.meiye.core.common.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author: zy
 * @CreateTime: 2022-07-22  15:17
 */
@RestController
@Api(value="意见反馈",tags = "意见反馈接口")
@RequestMapping("/feedback")
public class FeedbackController {
@Autowired
private FeedbackService feedbackService;
    //提交意见反馈
    @ApiOperation("提交取消说明")
    @PostMapping("/add")
    public Map add(String feedback){
        Integer add = feedbackService.add(feedback);
        JsonResult jsonResult=new JsonResult();
        if (add!=0){
            jsonResult.setCode("1");
            jsonResult.setMsg("反馈成功");
        }

        return jsonResult.getMap();
    }
}
